<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>拼团订单管理</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/index.css" />
</head>
<body> 
<div class="order">
    <div class="tabber"><div class="inner">
    <span <eq name="show_type" value="0">class="on"</eq>>全部</span>
    <span <eq name="show_type" value="2">class="on"</eq>>待收货</span>
    <span <eq name="show_type" value="99">class="on"</eq>>待成团</span>
    <span <eq name="show_type" value="3">class="on"</eq>>待通知</span>
    <span <eq name="show_type" value="4">class="on"</eq>>待核销</span>
    <span <eq name="show_type" value="6">class="on"</eq>>已核销</span>
    <!--<span <eq name="show_type" value="7">class="on"</eq>>已评价</span>-->
    </div></div>
    <div class="orderlist">
    	<div class="block" style="<eq name="show_type" value="0"><else/>display:none;</eq>">
            <ul>
                <!--全部-门店拼团订单-->
            <volist name="store_all" id="vo">
                <li>
                	<div class="tit">订单状态<span>
                    <eq name="vo.copy_state" value="0">待成团</eq>
                    <eq name="vo.copy_state" value="3">待通知</eq>
                    <eq name="vo.copy_state" value="4">待核销</eq>
                    <eq name="vo.copy_state" value="5">拼团失败</eq>
                    <eq name="vo.copy_state" value="6">已核销</eq>
                    </span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreOrder/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_all[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="md">门店</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_all[$key]['unit']);?></h2>
                            <eq name="vo.copy_state" value="0"><h5><span>还差<b>{$vo['min_num']-$vo['copy_num']}</b>份成团</span></h5></eq>
                            <eq name="vo.copy_state" value="3">
                                <h5><span>已订购<b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_all[$key]['unit']);?></span></h5>
                            </eq>
                            <eq name="vo.copy_state" value="4"><h5><span><b>{$vo['need_hx']}</b>人待核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['need_hx_num']}</b><?php echo getunit($store_all[$key]['unit']);?></span></h5></eq>
                            <eq name="vo.copy_state" value="5"><h5><span><b></b>拼团失败</span></h5></eq>
                            <eq name="vo.copy_state" value="6"><h5><span><b>{$vo['already_hx']}</b>人已核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_all[$key]['unit']);?></span></h5></eq>
                        </div>
                	</div>
                    <eq name="vo.copy_state" value="0"><div class="button"><input type="submit" onClick="do_succ(this)" copyid="{$vo.copy_id}" value="一键成团"/></div></eq>
                    <eq name="vo.copy_state" value="3"><div class="button"><input type="submit" onClick="do_notice(this)" copyid="{$vo.copy_id}" value="发送到货通知" style="width:100px;"/></div></eq>
                </li>
             </volist>

                <!--全部-乡村拼团订单-->
            <volist name="store_all_xc" id="vo">
                <li>
                	<div class="tit">订单状态<span>
                    <eq name="vo.copy_state" value="2">待收货</eq>
                    <eq name="vo.copy_state" value="3">待通知</eq>
                    <eq name="vo.copy_state" value="4">待核销</eq>
                    <eq name="vo.copy_state" value="6">已核销</eq>
                    </span></div> 
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_all_xc[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_all_xc[$key]['unit']);?></h2>
                            <!--<p><b><img src="__PUBLIC__/Wx/images/pic02.jpg"/></b><i>江训才</i><em>恩施荷花村</em></p>-->

                            <h5>
                            <eq name="vo.copy_state" value="3">
                                <h5><span>已订购<b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_all_xc[$key]['unit']);?></span></h5>
                            </eq>
                            <eq name="vo.copy_state" value="4">
                                <span><b>{$vo['need_hx']}</b>人待核销</span>
                                <span style="float:right">共<b>{$vo['u_num']*$vo['need_hx_num']}</b><?php echo getunit($store_all_xc[$key]['unit']);?></span>
                            </eq>
                            <eq name="vo.copy_state" value="6">
                                <span><b>{$vo['already_hx']}</b>人<eq name="vo.copy_state" value="6">已核销</eq></span>
                                <span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_all_xc[$key]['unit']);?></span>
                            </eq>
                            <!--&lt;!&ndash;<span style="float:right">共<b></b></span>&ndash;&gt;-->
                            <!--&lt;!&ndash;<span><b>600人</b>拼团</span>&ndash;&gt;-->
                                <!--<span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_all_xc[$key]['unit']);?></span>-->
                            </h5>
                        </div>
                	</div>
                    <eq name="vo.copy_state" value="2">
                    <div class="button"><input type="submit" value="申请售后" class="left02" onClick="window.location='afterapply.html/"/><input type="submit" onClick="do_have(this)" copyid="{$vo.copy_id}" value="确认收货"/></div>
                    </eq>
                    <eq name="vo.copy_state" value="3">
                    <div class="button"><input type="submit" onClick="do_message(this)" style="width:100px;" copyid="{$vo.copy_id}" value="发送到货通知"/></div>
                    </eq> 
                </li>
             </volist>  

            </ul>
        </div>
    	<div class="block" style="<eq name="show_type" value="2"><else/>display:none;</eq>">
            <ul>
            <volist name="store_ds_xc" id="vo">
                <li>
                	<div class="tit">订单状态<span>待收货</span></div> 
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_ds_xc[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_ds_xc[$key]['unit']);?></h2>
                            <!--<p><b><img src="__PUBLIC__/Wx/images/pic02.jpg"/></b><i>江训才</i><em>恩施荷花村</em></p>-->
                            <h5><span><b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_ds_xc[$key]['unit']);?></span></h5>
                        </div>
                	</div>
                    <div class="button"><input type="submit" onClick="do_have(this)" copyid="{$vo.copy_id}" value="确认收货"/></div>
                </li>
             </volist>  

            </ul>
        </div>
    	<div class="block" style="<eq name="show_type" value="99"><else/>display:none;</eq>">
        	<ul>
            <volist name="store_ds" id="vo">
                <li>
                	<div class="tit">订单状态<span>待成团</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreOrder/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_ds[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="md">门店</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_ds[$key]['unit']);?></h2>
                            <p><span><b>6</b>人已拼团</span><span style="float:right">共<b>600</b>斤</span></p>
                            <p><span>还差<b>{$vo['min_num']-$vo['copy_num']}</b>份成团</span></p>
                        </div>
                	</div>
                    <div class="button"><input type="submit" onClick="do_succ(this)" copyid="{$vo.copy_id}" value="一键成团"/></div>
                </li>
             </volist>  

            </ul>
        </div>
    	<div class="block" style="<eq name="show_type" value="3"><else/>display:none;</eq>">
        	<ul>
            <volist name="store_tz" id="vo">
                <li>
                	<div class="tit">订单状态<span>待通知</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreOrder/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_tz[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="md">门店</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_tz[$key]['unit']);?></h2>
                            <h5><span>已订购<b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b>斤</span></h5>
                        </div>
                	</div>
                    <div class="button"><input type="submit" onClick="do_notice(this)" copyid="{$vo.copy_id}" value="发送到货通知" style="width:100px;"/></div>
                </li>
             </volist>  
            <volist name="store_tz_xc" id="vo">
                <li>
                	<div class="tit">订单状态<span>待通知</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_tz_xc[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_tz_xc[$key]['unit']);?></h2>
                            <!--<p><b><img src="__PUBLIC__/Wx/images/pic02.jpg"/></b><i>江训才</i><em>恩施荷花村</em></p>-->
                            <h5><span><b>{$vo['copy_num']}</b>份</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_tz_xc[$key]['unit']);?></span></h5>
                        </div>
                	</div>
                    <div class="button"><input type="submit" onClick="do_message(this)" style="width:100px;" copyid="{$vo.copy_id}" value="发送到货通知"/></div>
                </li>
             </volist>  

            </ul>
        </div>
    	<div class="block" style="<eq name="show_type" value="4"><else/>display:none;</eq>">
        	<ul>
            <volist name="store_hx" id="vo">
                <li>
                	<div class="tit">订单状态<span>待核销</span></div>
                   	<div class="pro" onClick="window.location='info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_hx[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="md">门店</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_hx[$key]['unit']);?></h2>
                            <h5><span><b>{$vo['need_hx']}</b>人待核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['need_hx_num']}</b>斤</span></h5>
                        </div>
                	</div>
                    
                </li>
             </volist>  
            <volist name="store_hx_xc" id="vo">
                <li>
                	<div class="tit">订单状态<span>待核销</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_hx_xc[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_hx_xc[$key]['unit']);?></h2>
                            <!--<p><b><img src="__PUBLIC__/Wx/images/pic02.jpg"/></b><i>江训才</i><em>恩施荷花村</em></p>-->
                            <h5><span><b>{$vo['need_hx']}</b>人待核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['need_hx_num']}</b><?php echo getunit($store_hx_xc[$key]['unit']);?></span></h5>
                        </div>
                	</div>
                    
                </li>
             </volist>  

            </ul>
        </div>
    	<div class="block" style="<eq name="show_type" value="6"><else/>display:none;</eq>">
        	<ul>
            <volist name="store_yhx" id="vo">
                <li>
                	<div class="tit">订单状态<span>已核销</span></div>
                   	<div class="pro" onClick="window.location='info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_yhx[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="md">门店</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_yhx[$key]['unit']);?></h2>
                            <h5><span><b>{$vo['already_hx']}</b>人已核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_yhx[$key]['unit']);?></span></h5>
                        </div>
                	</div>
                    
                </li>
             </volist>  
            <volist name="store_yhx_xc" id="vo">
                <li>
                	<div class="tit">订单状态<span>已核销</span></div>
                   	<div class="pro" onClick="window.location='__MODULE__/StoreSpellGroup/info/id/{$vo.copy_id}/'">
                    	<div class="pic"><img src="<?php $img=explode(',',$store_yhx_xc[$key]['h_imgs']);echo $img[0]; ?>"/></div>	
                        <div class="name">
                        	<h2><b class="xc">乡村</b>{$vo.title} {$vo.u_num}<?php echo getunit($store_yhx_xc[$key]['unit']);?></h2>
                            <!--<p><b><img src="__PUBLIC__/Wx/images/pic02.jpg"/></b><i>江训才</i><em>恩施荷花村</em></p>-->
                            <h5><span><b>{$vo['already_hx']}</b>人已核销</span><span style="float:right">共<b>{$vo['u_num']*$vo['copy_num']}</b><?php echo getunit($store_yhx_xc[$key]['unit']);?></span></h5>
                        </div>
                	</div>
                    
                </li>
             </volist>  

            </ul>
        </div>

    	<div class="block" style="<eq name="show_type" value="7"><else/>display:none;</eq>">
            <!--暂时没有评价，注释2018-7-5 17：11-->
        	<!--<ul>-->
                <!--<li>-->
                	<!--<div class="tit">订单状态<span>买家已评价</span></div>-->
                    <!--<div class="pro" onClick="window.location='orderdetail-sj.html'">-->
                    	<!--<div class="pic"><img src="__PUBLIC__/Wx/images/pic13.jpg"/></div>	-->
                        <!--<div class="name">-->
                        	<!--<h2><b class="md">门店</b>恩施荷花村富硒小土豆 5斤</h2>-->
                           	<!--<p><span>销量：<b>10</b>份</span><span style="float:right">共<b>600</b>斤</span></p>-->
                        <!--</div>-->
                	<!--</div>-->
                    <!--<div class="button"><input type="submit" value="查看评论" class="left02" onClick="window.location='orderdetail-sj.html" style="margin-right:0;"/></div>-->
                <!--</li>-->
                <!--<li>-->
                	<!--<div class="tit">订单状态<span>买家已评价</span></div>-->
                    <!--<div class="pro" onClick="window.location='orderdetail-sj.html'">-->
                    	<!--<div class="pic"><img src="__PUBLIC__/Wx/images/pic13.jpg"/></div>	-->
                        <!--<div class="name">-->
                        	<!--<h2><b class="md">兑换</b>恩施荷花村富硒小土豆 5斤</h2>-->
                           	<!--<p><span>销量：<b>10</b>份</span><span style="float:right">共<b>600</b>斤</span></p>-->
                            <!--<h5><span><b>￥42.8+200积分</b></span><span style="float:right">X10</span></h5>-->
                        <!--</div>-->
                	<!--</div>-->
                    <!--<div class="total">共<b>10</b>件商品<span>合计：<i>￥428+200积分</i></span></div>-->
                    <!--<div class="button"><input type="submit" value="查看评论" class="left02" onClick="window.location='orderdetail-sj.html" style="margin-right:0;"/></div>-->
                <!--</li>-->
            <!--</ul>-->
        </div>

    </div>
</div>
	<script type="text/javascript" src="__PUBLIC__/Wx/js/jquery-1.9.1.js"></script>
	<script type="text/javascript">
		$('.tabber span').click(function(){ 
			$(this).addClass("on").siblings().removeClass() 
			$(".orderlist>.block").hide().eq($('.tabber span').index(this)).show(); 
		});
		(function($){
			$(function(){
				var $Width = $('.tabber .inner').width()/5.2;
				var len = $(".tabber .inner span").length;
			//	alert(len);
				$('.tabber .inner span').css({'width':$Width});
				$('.tabber .inner').css({'width':$Width*len});
			})
		})(jQuery)
		//确认收货
		function do_have(a){
			$.post('__MODULE__/StoreSpellGroup/do_have/id/'+$(a).attr('copyid')+'/');
			$(a).parent().parent().remove();
			location.reload();
		}//end fun
		//发送到货通知
		function do_message(a){
			$.post('__MODULE__/StoreSpellGroup/do_message/id/'+$(a).attr('copyid')+'/');
			$(a).parent().parent().remove();
			location.reload();
		}//end fun
		//一键成团
		function do_succ(a){
			//alert($(a).attr('copyid'));
			$.post('__MODULE__/StoreOrder/do_succ/id/'+$(a).attr('copyid')+'/');
			$(a).parent().parent().remove();
			location.reload();
		}//end fun
		//发送到货通知
		function do_notice(a){
			//alert($(a).attr('copyid'));
			$.post('__MODULE__/StoreOrder/do_notice/id/'+$(a).attr('copyid')+'/');
			$(a).parent().parent().remove();
			location.reload();
		}//end fun
	</script>
</body>
</html>